<template>
  <div>
    <div class="company">
      <h2>合作经纪公司</h2>
      <ul>
        <li v-for="company in companys" :key="company.id">
          <img :src="company.img" />
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  name: "companys",
  data() {
    return {
      companys: [],
    };
  },
  methods: {},
  created() {
    axios({
      url: "http://localhost:3000/companys",
      method: "get",
    }).then((res) => {
      console.log(res.data);
      this.companys = res.data;
      // console.log(this.banks);
    });
  },
};
</script>
<style scoped>
.company h2 {
  font-size: 0.22rem;
  margin-top: 0.2rem;
  /* margin-bottom: .1rem; */
}
.company ul {
  height: 0.6rem;
  width: 100%;
  display: flex;
}
.company li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30%;
  height: 0.5rem;
  flex-shrink: 0;
}
.company img {
  width: 100%;
  height: 100%;
}
</style>